#pragma once

#include "fxcc/core/graph/directX11/pch.h"

namespace fxcc
{
    namespace graph
    {
        namespace directX11
        {
            struct FXCC_API UploadBuffer
            {
                ComPtr<ID3D11Buffer> m_ConstantBuffer;

                int m_DataSize;

                UploadBuffer(const int sz);
                
                bool Init();

                void PSSet(int start, int num = 1);
                
                void VSSet(int start, int num = 1);
                
                void Upload(const void* t, const size_t& sz);

                template<typename T>
                void Upload(const T& t)
                {
                    Upload(&t, sizeof(T));

                }

            };
        }
    }
}